package be.novelfaces.component.webdriver;

import org.openqa.selenium.By;

import be.novelfaces.webdriver.BaseComponent;

public class Panel extends BaseComponent{
	
	private final String type;

	public Panel(By compId, String type) {
		super(compId);
		this.type = type;
	}
	
	public String getAttributeValue(String attr) {
		return getComponent().getAttribute(attr);
	}
	
	public boolean isCorrectType() {
		return type.equalsIgnoreCase(getComponent().getTagName());
	}
	
	public boolean containsText(String text) {
		return getComponent().getText().contains(text);
	}
	
}
